package com.alkaid.entity.Impl;


import com.alkaid.annotation.WakeUp;
import com.alkaid.entity.Person;
import lombok.Data;

@Data
public class PersonImpl implements Person {

    private String name;

    private Integer age;

    private String sex;

    public PersonImpl() {
    }

    public PersonImpl(String name, int age, String sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
    }

    @Override
    @WakeUp("Wake up before speak.")
    public void speak(String sentence) {
        System.out.println(name + " is speaking " + sentence);
    }

    @Override
    @WakeUp("Wake up before eat.")
    public void eat(String food) {
        System.out.println(name + " is eating " + food);
    }

    @Override
    @WakeUp("Wake up before run.")
    public void run(Integer distance) {
        System.out.println(name + " has run " + distance + " metres");
    }

}
